<template>
  <el-container class="Group-lessons">
    <el-header>
      <div>
        <el-page-header @back="goBack">
          <template #content>
            <span class="text-large font-600 mr-3"> Title </span>
          </template>
        </el-page-header>
      </div>
    </el-header>
    <el-main>
      <div class="Group-lessons-main">
        <el-row class="lessons-padding border">
          <el-button
            type="primary"
            :class="{
              'blue button-1 button-1-2': flag === 1,
              'white button-1 button-1-2': flag === 2,
            }"
            @click="update"
            ><router-link to="/mainView/teamManagement/CourseView"
              >团课课程</router-link
            ></el-button
          >
          <el-button
            type="primary"
            :class="{
              'blue button-1 button-1-3': flag === 2,
              'white button-1 button-1-3': flag === 1,
            }"
            @click="update2"
            ><router-link to="/mainView/teamManagement/ScheduleView"
              >团课课表</router-link
            ></el-button
          >
        </el-row>
        <div class="lessons-padding">
          <router-view></router-view>
        </div>
      </div>
    </el-main>
  </el-container>
</template>

<script lang="ts" setup>
import { ref } from "vue";
const goBack = () => {
  console.log("go back");
};
let flag = ref(1);
const update = () => {
  flag.value = 1;
  console.log(flag);
};
const update2 = () => {
  flag.value = 2;
  console.log(flag);
};
</script>

<style scoped>
/* 标签头部 */
.el-header {
  background-color: #737373;
}
.Group-lessons {
  background-color: #f2f2f2;
  height: 100vh;
}
.Group-lessons-main {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 10px !important;
}
.lessons-padding {
  padding: 5px 15px;
}
.dxk-12 {
  margin-left: 5px;
}
.button-1 a {
  text-decoration: none;
  color: black;
}
.button-1 {
  width: 100px !important;
  height: 30px !important;
  border: 1px solid #cccccc;
}
.blue {
  background-color: #409eff;
}
.blue a {
  color: white !important;
}
.white {
  background-color: #ffffff;
  color: black;
}
</style>
